﻿using Sc.Cache;
using Sc.Domain;
using Sc.Persistence;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sc.Service
{
    public class UserTokenService
    {
        /// <summary>
        /// 数据持久层
        /// </summary>
        private readonly UserTokenDAO dao = new UserTokenDAO();
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="ent">实体</param>
        /// <returns></returns>
        public int SaveData(UserToken ent)
        {
            var tmp = this.dao.SaveData(ent);
            ProjectCache.ClearUserToken();
            return tmp;
        }
    }
}
